<?php
function loadXML($data) {
  $xml = simplexml_load_string(file_get_contents($data));
  return $xml;
}
function XSRF($s){
	if(isset($_SERVER['HTTP_REFERER'])){
		$ref=parse_url($_SERVER['HTTP_REFERER']);
		print_r($ref);
		if($ref['host']==$_SERVER['SERVER_NAME'] && basename($ref['path'])==$s){
		 return true;
	}
	}else{
		 return false;
	}

}
function CLR($s){
	$s = str_replace("'","",$s);
	$s = str_replace("\"","",$s);
	$s = str_replace("(","",$s);
	$s = str_replace(")","",$s);
	$s = str_replace("#","",$s);
	$s = str_replace("+","",$s);
	$s = str_replace("-","",$s);
	$s = str_replace("&","",$s);
	$s = str_replace("[","",$s);
	$s = str_replace("]","",$s);
	return $s;
}
